package com.lhy.mymall.service;

import com.github.pagehelper.PageInfo;
import com.lhy.mymall.exception.MallException;
import com.lhy.mymall.pojo.Product;
import com.lhy.mymall.request.AddProductReq;
import com.lhy.mymall.request.ProductListReq;
import com.lhy.mymall.request.UpdateProductReq;

import java.io.File;
import java.io.IOException;
import java.util.List;

/**
 * @author: 卢辉宇
 * @date: 2022/12/16 21:13
 * @description:
 */
public interface ProductService {
    Product selectByName(String name);

    void addProduct(AddProductReq addProductReq) throws MallException;

    void updateProduct(UpdateProductReq updateProductReq) throws MallException;

    void deleteProduct(Integer id) throws MallException;

    void batchUpdateShellStatus(Integer[] ids, Integer status);

    PageInfo listForAdmin(Integer pageNum, Integer pageSize);

    Product detail(Integer id);

    PageInfo list(ProductListReq productListReq);

    void addProductByExcel(File destFile) throws IOException, MallException;
}
